package com.ywgt.system.pojo;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 用户表
 * </p>
 *
 * @author yiping
 * @since 2021-01-15
 */
@Data
@ContentRowHeight(10)
@HeadRowHeight(20)
@ColumnWidth(25)
@EqualsAndHashCode(callSuper = false)
@TableName("tb_user")
@ApiModel(value="User对象", description="用户表")
public class User implements Serializable {

    private static final long serialVersionUID = 1L;
    @ExcelProperty(value = "用户ID")
    @ApiModelProperty(value = "用户ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    @ExcelProperty(value = "用户名")
    @ApiModelProperty(value = "用户名")
    private String username;
    @ExcelProperty(value = "别名")
    @ApiModelProperty(value = "别名")
    private String nickname;
    @ExcelProperty(value = "邮箱")
    @ApiModelProperty(value = "邮箱")
    private String email;
    @ExcelProperty(value = "头像")
    @ApiModelProperty(value = "头像")
    private String avatar;
    @ExcelProperty(value = "联系电话")
    @ApiModelProperty(value = "联系电话")
    private String phoneNumber;
    @ExcelProperty(value = "状态")
    @ApiModelProperty(value = "状态 0锁定 1有效")
    private Integer status;
    @ExcelProperty(value = "创建时间")
    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    @ExcelProperty(value = "修改时间")
    @ApiModelProperty(value = "修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date modifiedTime;
    @ExcelProperty(value = "性别")
    @ApiModelProperty(value = "性别 0男 1女 2保密")
    private Integer sex;
    @ExcelProperty(value = "盐")
    @ApiModelProperty(value = "盐")
    private String salt;
    @ExcelProperty(value = "类型")
    @ApiModelProperty(value = "0:超级管理员，1：系统用户")
    private Integer type;
    @ExcelProperty(value = "密码")
    @ApiModelProperty(value = "密码")
    private String password;
    @ExcelProperty(value = "生日")
    @ApiModelProperty(value = "生日")
    @JsonFormat(pattern = "yyyy年MM月dd日",timezone = "GMT+8")
    private Date birth;
    @ExcelProperty(value = "部门id")
    @ApiModelProperty(value = "部门id")
    private Long departmentId;
    @ExcelIgnore
    @ApiModelProperty(value = "部门名称")
    @TableField(exist = false)
    private String name;
}
